package ltd.hxya.novel.entity.base;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * entity继承的基础类
 */
@Data
public class BaseEntity {


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy_MM-dd")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private Map<String,Object> params;

    @JsonIgnore
    @TableField(exist = false)
    private String beginTime;

    @JsonIgnore
    @TableField(exist = false)
    private String endTime;

    @TableField(exist = false)
    private String sortType;

    @TableField(exist = false)
    private String operId;

    @TableField(exist = false)
    private String keyword;
}
